<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title>API: svg  SVG.Board   (YUI Library)</title>

	<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css?stamp=1316139452.08" />
	<link rel="stylesheet" type="text/css" href="assets/api.css?stamp=1316139452.08" />

    <script type="text/javascript" src="assets/api-js?stamp=1316139452.08"></script>
    <script type="text/javascript" src="assets/ac-js?stamp=1316139452.08"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">
	<div id="hd">
        <h1><a href="http://developer.yahoo.com/yui/" title="g-javascript-lib">g-javascript-lib</a></h1>
        <h3>svg&nbsp; <span class="subtitle">1.0.0</span></h3>
        <a href="./index.html" title="g-javascript-lib">g-javascript-lib</a> 
            &gt; <a href="./module_svg.html" title="svg">svg</a>
                 &gt; SVG.Board 
                
        <form onsubmit="return false">
            <div id="propertysearch">
                Search: <input autocomplete="off" id="searchinput" />
                <div id="searchresults">
                    &nbsp;
                </div>
            </div>
        </form>
	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
                <fieldset>
                    <legend>Filters</legend>
                <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
                <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
                <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
                </fieldset>
            </form>

                    <h2>
                        

                        
                        
                            Class <b property="yui:name">SVG.Board</b>
                        <span class="extends">
                        </span>

                    </h2>
                    <!-- class tree goes here -->
                    
                
  

                    <div class="summary description" property="yui:description">
                        A drawing board in SVG.
                    </div>

                    
                    <div rel="yui:properties" resource="#properties">

                    </div>

                    <div rel="yui:methods" resource="#methods">
                        <div class="section method details">
                            <h3 id="methods">Methods</h3>
                            <div class="content">
                                    <div class="" rel="yui:method" resource="#method__draw_cursor">
                                    <h4>
                                        <a name="method__draw_cursor">_draw_cursor</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">_draw_cursor</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Draw the cross line as cursor.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method__draw_grid">
                                    <h4>
                                        <a name="method__draw_grid">_draw_grid</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">_draw_grid</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Draw the grid box. The grid box include a background rect to show grid
and a cross line as cursor.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method__fix_scale">
                                    <h4>
                                        <a name="method__fix_scale">_fix_scale</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        float
                                            <strong property="yui:name">_fix_scale</strong>
                                           (
                                                
                                                        
                                                         scale
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Make sure the scale was a multiple of 0.1 if it's greater than 0.1
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">scale</span>
                                                        &lt;<span property="yui:type">float</span>&gt;
                                                        </code>
                                                        <span property="yui:description"></span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        float
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method__map_mouse_matrix">
                                    <h4>
                                        <a name="method__map_mouse_matrix">_map_mouse_matrix</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        x,y
                                            <strong property="yui:name">_map_mouse_matrix</strong>
                                           (
                                                
                                                        
                                                         evt
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Get the point of mouse event in board's coordinate system.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">evt</span>
                                                        &lt;<span property="yui:type">mouse event</span>&gt;
                                                        </code>
                                                        <span property="yui:description"></span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        x,y
                                                    </code></dt>
                                                    <dd property="yui:returnInfo">the X,Y value of coordinate.</dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method__on_resize">
                                    <h4>
                                        <a name="method__on_resize">_on_resize</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">_on_resize</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            When the size of svg container was changed,  we need calculate the
scale range again.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method__snap_to_grid">
                                    <h4>
                                        <a name="method__snap_to_grid">_snap_to_grid</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">_snap_to_grid</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Fix the value of coordinate to align on grid.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method__update_matrix">
                                    <h4>
                                        <a name="method__update_matrix">_update_matrix</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">_update_matrix</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Update the transform matrix according the scale, offset and mirror 
status of the board.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method__update_scale_range">
                                    <h4>
                                        <a name="method__update_scale_range">_update_scale_range</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">_update_scale_range</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            This funciton will calculate the MIN, MAX and FIT scale of the board.
The minimum of scale to make sure the whole draw board can be fit into 
window, but the value must be in the range of 0.001 -- 1.</br>
The fit scale will make the whole board displayed into the view area.
When zoom in/out, if the scale was set into the range of 0.1 -- 1, 
it must be regulate to multiple of 0.1 to avoid the deviation of grid.
The size of grid is always multiple of 10.
if the scale was set to smaller than 0.1, the grid will dispared.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_add_background">
                                    <h4>
                                        <a name="method_add_background">add_background</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">add_background</strong>
                                           (
                                                
                                                        
                                                         shp
                                                    
                                                
                                                        , 
                                                         attr
                                                    
                                                
                                                        , 
                                                         p
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Append a SVG element into background.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">shp</span>
                                                        &lt;<span property="yui:type">string</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  the tag name of the element</span>
                                                        </dd>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">attr</span>
                                                        &lt;<span property="yui:type">object</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  the attributes of the element</span>
                                                        </dd>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">p</span>
                                                        &lt;<span property="yui:type">SVG Element</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  the father of the element, default to background box.</span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_add_element">
                                    <h4>
                                        <a name="method_add_element">add_element</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        SVG Element
                                            <strong property="yui:name">add_element</strong>
                                           (
                                                
                                                        
                                                         shp
                                                    
                                                
                                                        , 
                                                         attr
                                                    
                                                
                                                        , 
                                                         p
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Append an element into the draw box.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">shp</span>
                                                        &lt;<span property="yui:type">string</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  the tag name of the element</span>
                                                        </dd>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">attr</span>
                                                        &lt;<span property="yui:type">object</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  the attributes of the element</span>
                                                        </dd>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">p</span>
                                                        &lt;<span property="yui:type">SVG Element</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  the father of the element, default to draw box</span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        SVG Element
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_add_use">
                                    <h4>
                                        <a name="method_add_use">add_use</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        SVG Element
                                            <strong property="yui:name">add_use</strong>
                                           (
                                                
                                                        
                                                         symName
                                                    
                                                
                                                        , 
                                                         attr
                                                    
                                                
                                                        , 
                                                         parent
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Add a use to the predefined symbol.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">symName</span>
                                                        &lt;<span property="yui:type">string</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  the name of symbol to use.</span>
                                                        </dd>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">attr</span>
                                                        &lt;<span property="yui:type">string</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  the attribute of the element;</span>
                                                        </dd>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">parent</span>
                                                        &lt;<span property="yui:type">SVG Element</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  the parent node of the element.</span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        SVG Element
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_def_symbol">
                                    <h4>
                                        <a name="method_def_symbol">def_symbol</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        SVG element
                                            <strong property="yui:name">def_symbol</strong>
                                           (
                                                
                                                        
                                                         name
                                                    
                                                
                                                        , 
                                                         tag
                                                    
                                                
                                                        , 
                                                         attr
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Add an element into defs with a name.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">name</span>
                                                        &lt;<span property="yui:type">string</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  the name of the defined element.</span>
                                                        </dd>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">tag</span>
                                                        &lt;<span property="yui:type">string</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  the tag name of the element default to 'g'</span>
                                                        </dd>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">attr</span>
                                                        &lt;<span property="yui:type">string</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  the attribute of the element</span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        SVG element
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_find_event_obj">
                                    <h4>
                                        <a name="method_find_event_obj">find_event_obj</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">find_event_obj</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            the source element of the event can be anything in SVG. this function
is used to find the object that the element belong to.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_load_hot_key">
                                    <h4>
                                        <a name="method_load_hot_key">load_hot_key</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">load_hot_key</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Load short-cut key command list
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_mirror">
                                    <h4>
                                        <a name="method_mirror">mirror</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">mirror</strong>
                                           (
                                                
                                                        
                                                         mirror
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Mirror the board.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">mirror</span>
                                                        &lt;<span property="yui:type">boolean</span>&gt;
                                                        </code>
                                                        <span property="yui:description"></span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_move_cursor">
                                    <h4>
                                        <a name="method_move_cursor">move_cursor</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">move_cursor</strong>
                                           (
                                                
                                                        
                                                         p
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Move the cursor in the coordinate system of board.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">p</span>
                                                        &lt;<span property="yui:type">point</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  The x/y value of the target position.</span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_remove_element">
                                    <h4>
                                        <a name="method_remove_element">remove_element</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">remove_element</strong>
                                           (
                                                
                                                        
                                                         em
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Remove an element.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">em</span>
                                                        &lt;<span property="yui:type">SVG Element</span>&gt;
                                                        </code>
                                                        <span property="yui:description"></span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_render">
                                    <h4>
                                        <a name="method_render">render</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">render</strong>
                                           (
                                                
                                                        
                                                         container
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Create SVG element into the container.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">container</span>
                                                        &lt;<span property="yui:type">DOM Element</span>&gt;
                                                        </code>
                                                        <span property="yui:description"></span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_set_grid">
                                    <h4>
                                        <a name="method_set_grid">set_grid</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">set_grid</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Set the grid size. the grid size must be a multiply of 10.
to avoid the deviation when zoom in/out.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_set_scale_step">
                                    <h4>
                                        <a name="method_set_scale_step">set_scale_step</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">set_scale_step</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Set how many steps to zoom the scale from minimum to maximum.
The default step is 10.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_set_size">
                                    <h4>
                                        <a name="method_set_size">set_size</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">set_size</strong>
                                           (
                                                
                                                        
                                                         w
                                                    
                                                
                                                        , 
                                                         h
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Set the size of svg board's. the SVGBoard will adjust the scale
range to fit the new size of board.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">w</span>
                                                        &lt;<span property="yui:type">integer</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  width</span>
                                                        </dd>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">h</span>
                                                        &lt;<span property="yui:type">integer</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  height</span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_set_view">
                                    <h4>
                                        <a name="method_set_view">set_view</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">set_view</strong>
                                           (
                                                
                                                        
                                                         scale
                                                    
                                                
                                                        , 
                                                         center
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Move and scale the view window.
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">scale</span>
                                                        &lt;<span property="yui:type">float</span>&gt;
                                                        </code>
                                                        <span property="yui:description"></span>
                                                        </dd>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">center</span>
                                                        &lt;<span property="yui:type">integer</span>&gt;
                                                        </code>
                                                        <span property="yui:description">  the center of the view area, the value
will be fixed to align to grid.</span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_view_grid">
                                    <h4>
                                        <a name="method_view_grid">view_grid</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">view_grid</strong>
                                           (
                                                
                                                        
                                                         on
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Set the grid on/off
                                        </div>

                                        <div class="description">

                                                <dl rel="yui:parameters">
                                                    <dt>Parameters:</dt>
                                                        <dd rel="yui:parameter">
                                                        <code><span property="yui:name">on</span>
                                                        &lt;<span property="yui:type">boolean</span>&gt;
                                                        </code>
                                                        <span property="yui:description"></span>
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="" rel="yui:method" resource="#method_zoom_fit">
                                    <h4>
                                        <a name="method_zoom_fit">zoom_fit</a></h4>
                                    <div class="detail" >
                                        <code>
                                        
                                        
                                        
                                        void
                                            <strong property="yui:name">zoom_fit</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description" property="yui:description">
                                            Zoom the board to fit the view area.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code property="yui:return">
                                                        void
                                                    </code></dt>
                                                    <dd property="yui:returnInfo"></dd>
                                                </dl>


             

                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                            </div>
                        </div>

                    </div>

                    <div rel="yui:events" resource="#events">


                    </div>

                    <div rel="yui:attributes" resource="#configattributes">

                    </div>

			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div id="moduleList" class="module">
                        <h4>Modules</h4>
                        <ul class="content">
                                <li class=""><a href="module_base.html" title="base">base</a></li>
                                <li class="selected"><a href="module_svg.html" title="svg">svg</a></li>
                                <li class=""><a href="module_test.html" title="test">test</a></li>
                                <li class=""><a href="module_utils.html" title="utils">utils</a></li>
                                <li class=""><a href="module_widget.html" title="widget">widget</a></li>
                        </ul>
                    </div>

                    <div id="classList" class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class="selected"><a href="SVG.Board.html" title="SVG.Board">SVG.Board</a></li>
                        </ul>
                    </div>

                    <div id="fileList" class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class=""><a href="drawmode.js.html" title="drawmode.js">drawmode.js</a></li>
                                <li class=""><a href="test.js.html" title="test.js">test.js</a></li>
                        </ul>
                    </div>


                    <div id="methodsList" class="module">
                        <h4>Methods</h4>
                        <ul class="content">        
                                <li class=""><a href="#method__draw_cursor" title="_draw_cursor">_draw_cursor</a></li>
                                <li class=""><a href="#method__draw_grid" title="_draw_grid">_draw_grid</a></li>
                                <li class=""><a href="#method__fix_scale" title="_fix_scale">_fix_scale</a></li>
                                <li class=""><a href="#method__map_mouse_matrix" title="_map_mouse_matrix">_map_mouse_matrix</a></li>
                                <li class=""><a href="#method__on_resize" title="_on_resize">_on_resize</a></li>
                                <li class=""><a href="#method__snap_to_grid" title="_snap_to_grid">_snap_to_grid</a></li>
                                <li class=""><a href="#method__update_matrix" title="_update_matrix">_update_matrix</a></li>
                                <li class=""><a href="#method__update_scale_range" title="_update_scale_range">_update_scale_range</a></li>
                                <li class=""><a href="#method_add_background" title="add_background">add_background</a></li>
                                <li class=""><a href="#method_add_element" title="add_element">add_element</a></li>
                                <li class=""><a href="#method_add_use" title="add_use">add_use</a></li>
                                <li class=""><a href="#method_def_symbol" title="def_symbol">def_symbol</a></li>
                                <li class=""><a href="#method_find_event_obj" title="find_event_obj">find_event_obj</a></li>
                                <li class=""><a href="#method_load_hot_key" title="load_hot_key">load_hot_key</a></li>
                                <li class=""><a href="#method_mirror" title="mirror">mirror</a></li>
                                <li class=""><a href="#method_move_cursor" title="move_cursor">move_cursor</a></li>
                                <li class=""><a href="#method_remove_element" title="remove_element">remove_element</a></li>
                                <li class=""><a href="#method_render" title="render">render</a></li>
                                <li class=""><a href="#method_set_grid" title="set_grid">set_grid</a></li>
                                <li class=""><a href="#method_set_scale_step" title="set_scale_step">set_scale_step</a></li>
                                <li class=""><a href="#method_set_size" title="set_size">set_size</a></li>
                                <li class=""><a href="#method_set_view" title="set_view">set_view</a></li>
                                <li class=""><a href="#method_view_grid" title="view_grid">view_grid</a></li>
                                <li class=""><a href="#method_zoom_fit" title="zoom_fit">zoom_fit</a></li>
                        </ul>
                    </div>



            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2011 Yahoo! Inc. All rights reserved.
	</div>
</div>
<script type="text/javascript">
    ALL_YUI_PROPS = [{"url": "SVG.Board.html#method_add_background", "access": "", "host": "SVG.Board", "type": "method", "name": "add_background"}, {"url": "SVG.Board.html#method_add_element", "access": "", "host": "SVG.Board", "type": "method", "name": "add_element"}, {"url": "SVG.Board.html#method_add_use", "access": "", "host": "SVG.Board", "type": "method", "name": "add_use"}, {"url": "SVG.Board.html#method_def_symbol", "access": "", "host": "SVG.Board", "type": "method", "name": "def_symbol"}, {"url": "SVG.Board.html#method__draw_cursor", "access": "", "host": "SVG.Board", "type": "method", "name": "_draw_cursor"}, {"url": "SVG.Board.html#method__draw_grid", "access": "", "host": "SVG.Board", "type": "method", "name": "_draw_grid"}, {"url": "SVG.Board.html#method_find_event_obj", "access": "", "host": "SVG.Board", "type": "method", "name": "find_event_obj"}, {"url": "SVG.Board.html#method__fix_scale", "access": "", "host": "SVG.Board", "type": "method", "name": "_fix_scale"}, {"url": "SVG.Board.html#method_load_hot_key", "access": "", "host": "SVG.Board", "type": "method", "name": "load_hot_key"}, {"url": "SVG.Board.html#method__map_mouse_matrix", "access": "", "host": "SVG.Board", "type": "method", "name": "_map_mouse_matrix"}, {"url": "SVG.Board.html#method_mirror", "access": "", "host": "SVG.Board", "type": "method", "name": "mirror"}, {"url": "SVG.Board.html#method_move_cursor", "access": "", "host": "SVG.Board", "type": "method", "name": "move_cursor"}, {"url": "SVG.Board.html#method__on_resize", "access": "", "host": "SVG.Board", "type": "method", "name": "_on_resize"}, {"url": "SVG.Board.html#method_remove_element", "access": "", "host": "SVG.Board", "type": "method", "name": "remove_element"}, {"url": "SVG.Board.html#method_render", "access": "", "host": "SVG.Board", "type": "method", "name": "render"}, {"url": "SVG.Board.html#method_set_grid", "access": "", "host": "SVG.Board", "type": "method", "name": "set_grid"}, {"url": "SVG.Board.html#method_set_scale_step", "access": "", "host": "SVG.Board", "type": "method", "name": "set_scale_step"}, {"url": "SVG.Board.html#method_set_size", "access": "", "host": "SVG.Board", "type": "method", "name": "set_size"}, {"url": "SVG.Board.html#method_set_view", "access": "", "host": "SVG.Board", "type": "method", "name": "set_view"}, {"url": "SVG.Board.html#method__snap_to_grid", "access": "", "host": "SVG.Board", "type": "method", "name": "_snap_to_grid"}, {"url": "SVG.Board.html#method__update_matrix", "access": "", "host": "SVG.Board", "type": "method", "name": "_update_matrix"}, {"url": "SVG.Board.html#method__update_scale_range", "access": "", "host": "SVG.Board", "type": "method", "name": "_update_scale_range"}, {"url": "SVG.Board.html#method_view_grid", "access": "", "host": "SVG.Board", "type": "method", "name": "view_grid"}, {"url": "SVG.Board.html#method_zoom_fit", "access": "", "host": "SVG.Board", "type": "method", "name": "zoom_fit"}];
</script>
</body>
</html>
